﻿/**
 * ...
 * @author	Kliment
 * @version	1.3.0
 */

class kliment.geom.draw.LineStyle {
	public static var SCALE_NORMAL:String = 'normal';
	public static var SCALE_NONE:String = 'none';
	public static var SCALE_VERTICAL:String = 'vertical';
	public static var SCALE_HORIZONTAL:String = 'horizontal';
	
	static public var CAPSSTYLE_ROUND:String = 'round';
	static public var CAPSSTYLE_SQUARE:String = 'square';
	static public var CAPSSTYLE_NONE:String = 'none';
	
	static public var JOINTSTYLE_ROUND:String = 'round';
	static public var JOINTSTYLE_MITER:String = 'miter';
	static public var JOINTSTYLE_BEVEL:String = 'bevel';
	
	public var thickness:Number;
	public var color:Number;
	public var alpha:Number;
	public var pixelHinting:Boolean;
	public var noScale:String;
	public var capsStyle:String;
	public var jointStyle:String;
	public var miterLimit:Number;
	
	public function LineStyle(thickness:Number, color:Number, alpha:Number, pixelHinting:Boolean, noScale:String, capsStyle:String, jointStyle:String, miterLimit:Number) {
		this.thickness = (thickness != null)?thickness:1;
		this.color = (color != null)?color:0x000000;
		this.alpha = (alpha != null)?alpha:100;
		this.pixelHinting = pixelHinting;
		this.noScale = noScale;
		this.capsStyle = capsStyle;
		this.jointStyle = jointStyle;
		this.miterLimit = miterLimit;

	}
	
	public function clone():LineStyle {
		return new LineStyle(thickness, color, alpha, pixelHinting, noScale, capsStyle, jointStyle, miterLimit);
	}
}